import request from '@/utils/request'

// 查询资讯标签列表
export function listTag(query) {
  return request({
    url: '/content/tag/list',
    method: 'get',
    params: query
  })
}

// 查询资讯标签详细
export function getTag(id) {
  return request({
    url: '/content/tag/' + id,
    method: 'get'
  })
}

// 新增资讯标签
export function addTag(data) {
  return request({
    url: '/content/tag',
    method: 'post',
    data: data
  })
}

// 修改资讯标签
export function updateTag(data) {
  return request({
    url: '/content/tag',
    method: 'put',
    data: data
  })
}

// 删除资讯标签
export function delTag(id) {
  return request({
    url: '/content/tag/' + id,
    method: 'delete'
  })
}

// 资讯标签状态修改
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/content/type/changeStatus',
    method: 'put',
    data: data
  })
}
